#!/bin/bash -e

function info() {
    echo Usage: `basename $0` '[-r ref_db] input.vcf'
    exit 1
}

while getopts ":p:f:r:" opt; do
    case  $opt  in
        p) out_prefix=$OPTARG;;
        f) suffix=$OPTARG;;
        r) ref_db=$OPTARG;;
        *) info;;
    esac
done
shift $(($OPTIND - 1))

if [ $# -lt 1 ]; then info; fi

. $var

# ref_db=${ref_db:=GRCh37.75}

# snpeff=/mnt/ilustre/users/fei.yang/tools/jars/snpeff
# java -Xmx4g -jar $snpeff \
# $ref_db \
# $1 > $out_prefix.snpeff.vcf



java $j_mem -jar $snpeff \
	-c ${snpeff_path}/snpEff.config \
	-v \
	-lof \
	-noStats \
	$snpeff_db_version \
	$1 \
	> $out_prefix.snpeff.vcf
    
. $cmd_done